package service.impl;

import dao.StaffSkillDao;
import entity.Staff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import service.StaffSkillService;

import java.util.List;

@Service()
@Transactional(propagation = Propagation.REQUIRED)
public class StaffSkillServiceImpl implements StaffSkillService {
    @Autowired
    StaffSkillDao staffSkillDao;

    @Override
    public Integer addStaffSkill(Integer staffid, Integer skillid) {
        return staffSkillDao.addStaffSkill(staffid,skillid);
    }

    @Override
    public Integer delStaffSkill(Integer staffid) {
        return staffSkillDao.delStaffSkill(staffid);
    }

    @Override
    public List<Staff> getSftaffsBySkillId(Integer skillid) {
        return staffSkillDao.getSftaffsBySkillId(skillid);
    }
}
